﻿@model SAKS.ViewModels.DocumentCreateUpdateModel
@{
    ViewBag.Title = "文档上传";
    Layout = "~/Views/Achievement/_Layout.cshtml";
}
<link href="@Url.Content("~/Content/themes/base/validationEngine.jquery.css")" rel="stylesheet" type="text/css" />
<script src="@Url.Content("~/Scripts/jquery.validationEngine.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validationEngine-ch.js")" type="text/javascript"></script>
<script type="text/javascript">
    $(function () {
        $(".button").button();
        $("form").validationEngine();
        $("#CompletedDate,#ArchivedDate").datepicker({
            changeMonth: true,
            changeYear: true,
            dateFormat: 'yy-mm-dd',
            dayNames: ['周日', '周一', '周二', '周三', '周四', '周五', '周六']
        });
    });
</script>

<form method="post" action="/Achievement/UploadDoc" enctype="multipart/form-data">
    <input type="hidden" id="AchievementId" name="AchievementId" value="@ViewBag.AchievementId" />
    <input type="file" id="doc" name="doc" class="validate[required] "/>
    <div class="editor-label">
        文档编号
    </div>      
    <div class="editor-field">
        <input type="text" id="SerialNumber" name="SerialNumber" class="validate[custom[integer]]" value="@Model.SerialNumber"/>
    </div>      
    <div class="editor-label">
        安全级别
    </div>      
    <div class="editor-field">
        <select id="SecurityLevel" name="SecurityLevel" class="validate[required]">
            <option value="Free" @(Model.SecurityLevel == "Free" ? " selected='selected'" : "")>无限制</option>
            <option value="Site" @(Model.SecurityLevel == "Site" ? " selected='selected'" : "")>站内共享</option>
            <option value="Project" @(Model.SecurityLevel == "Project" ? " selected='selected'" : "")>项目内共享</option>
        </select>
    </div> 
    <div class="editor-label">
        创建目的
    </div>      
    <div class="editor-field">
        <input type="text" id="CreatePurpose" name="CreatePurpose" value="@Model.CreatePurpose"/>
    </div> 
    <div class="editor-label">
        主要作者
    </div>      
    <div class="editor-field">
        <input type="text" id="PrimaryAuthor" name="PrimaryAuthor" value="@Model.PrimaryAuthor"/>
    </div> 
    <div class="editor-label">
        完成时间
    </div>      
    <div class="editor-field">
        <input type="text" id="CompletedDate" name="CompletedDate" value="@Model.CompletedDate"/>
    </div> 
    <div class="editor-label">
        归档时间
    </div>      
    <div class="editor-field">
        <input type="text" id="ArchivedDate" name="ArchivedDate" value="@Model.ArchivedDate"/>
    </div> 
    <div class="editor-label">
        摘要
    </div>      
    <div class="editor-field">
        <textarea  id="Remarks" name="Remarks" value="@Model.Remarks"> </textarea>
    </div> 

    <br />
    <input type="submit" class="button" value="保存" />
</form>
@Html.ValidationSummary(true)    



